package com.pubinfo.passbook.common.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pubinfo.passbook.common.handler.excel.CustomStatusConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 合同基础信息表
 *
 * @TableName t_contract_base
 */
@Data

@HeadRowHeight(20)
@Accessors(chain = true)
@TableName(value = "t_contract_base")
public class TContractBase implements Serializable {
  
  @TableId(value = "contract_id", type = IdType.AUTO)
  @ExcelProperty("合同流水号")
  @ApiModelProperty("合同流水号")
  private Integer contractId;
  
  @ApiModelProperty("地区ID")
  @ExcelProperty("地区ID")
  private Integer orgId;
  
  @ApiModelProperty("合同编号")
  @ExcelProperty("合同编号")
  private String contractCode;
  
  @ApiModelProperty("合同名称")
  @ExcelProperty("合同名称")
  private String contractName;
  
  @ApiModelProperty("合同手机号")
  private String contractPhone;
  
  @ApiModelProperty("帐套")
  @ExcelProperty("帐套")
  private String accountCase;
  
  @ApiModelProperty("源合同状态")
  private String sourceStatus;
  @ApiModelProperty("单位")
  @ExcelProperty("单位")
  private String company;
  @ApiModelProperty("最后修改人")
  @ExcelProperty("最后修改人")
  private String modifiedBy;
  
  @ApiModelProperty("合同对方名称")
  @ExcelProperty("合同对方名称")
  private String partbName;
  
  @ApiModelProperty("年份")
  @ExcelProperty("年份")
  private Integer contractYear;
  
  @ApiModelProperty("合同生效日期")
  @ExcelProperty("合同生效日期")
  private Date contractDate;
  
  @ApiModelProperty("合同金额")
  @ExcelProperty("合同金额")
  private BigDecimal contractAmount;
  
  @ApiModelProperty("已开票金额")
  @ExcelProperty("已开票金额")
  private BigDecimal invoiceAmount;
  
  @ApiModelProperty("税号")
  @ExcelProperty("税号")
  private String socialCode;
  
  @ApiModelProperty("收款方账户 开户名称")
  @ExcelProperty("收款方账户 开户名称")
  private String accountName;
  
  @ApiModelProperty("收款方账户 开户行")
  @ExcelProperty("收款方账户 开户行")
  private String bankName;
  
  @ApiModelProperty("收款方账户 账号")
  @ExcelProperty("收款方账户 账号")
  private String bankAccounts;
  
  @ApiModelProperty("承接部门")
  @ExcelProperty("承接部门")
  private String department;
  
  //    @ApiModelProperty("分割后的部门")@ExcelProperty("字符串标题")
//    private String division;
  @ApiModelProperty("合同承办人编码")
  @ExcelProperty("合同承办人编码")
  private String contractUserId;
  
  @ApiModelProperty("承办人")
  @ExcelProperty("承办人")
  private String contractorUser;
  
  @ApiModelProperty("认领人")
  @ExcelProperty("认领人")
  private String processUser;
  
  @ApiModelProperty("认领人姓名")
  @ExcelProperty("认领人姓名")
  private String processName;
  @ApiModelProperty("认领时间")
  @ExcelProperty("认领时间")
  private Date processTime;
  
  @ApiModelProperty("附件")
  //@ExcelProperty("附件")
  private String attachment;
  
  @ApiModelProperty("地址")
  @ExcelProperty("地址")
  private String consAddr;
  
  @ApiModelProperty("合同履行期限启")
  //@ExcelProperty("合同履行期限启")
  private Date signDate;
  
  @ApiModelProperty("履行期限止")
  //@ExcelProperty("履行期限止")
  private Date endDate;
  
  @ApiModelProperty("状态 0未认领;10已认领;20关闭")
  @ExcelProperty(value = "状态", index = 10, converter = CustomStatusConverter.class)
  private Integer status;
  
  @ApiModelProperty("地市编码")
  @ExcelProperty("地市编码")
  private String cityCode;
  
  @ApiModelProperty("地市名称")
  @ExcelProperty("地市名称")
  private String cityName;
  
  @ApiModelProperty("区县编码")
  @ExcelProperty("区县编码")
  private String districtCode;
  
  @ApiModelProperty("区县名称")
  @ExcelProperty("区县名称")
  private String districtName;
  
  @ApiModelProperty("创建时间")
  @ExcelProperty("创建时间")
  private Date createTime;
  
  @ApiModelProperty("更新时间")
  @ExcelProperty("更新时间")
  private Date updateTime;
  
  @ApiModelProperty("合同类型：0：初期清洗数据，1：正式上线生产数据")
  @ExcelProperty(value = "合同类型：0：初期清洗数据，1：正式上线生产数据")
  private Integer contractType;
  
  @ApiModelProperty("剩余可冲销额度")
  @ExcelProperty("剩余可冲销额度")
  private BigDecimal residualWriteOff;
  @ApiModelProperty("已冲减金额")
  @ExcelProperty("已冲减金额")
  private BigDecimal offsetAmount = BigDecimal.ZERO;
  @ApiModelProperty("外部审定金额")
  @ExcelProperty("外部审定金额")
  private BigDecimal approvedAmount = BigDecimal.ZERO;
  @ApiModelProperty("实际收款金额")
  @ExcelProperty("实际收款金额")
  private BigDecimal collectedAmount = BigDecimal.ZERO;
  
}